package com.journaldev.threadpool.poolexecutor;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * 处理不能适应工作队列的工作
 * @author:chenhs E-mail:hson08_chen@163.com
 * Created on 2017年9月8日 上午11:45:04
 */
public class RejectedExecutionHandlerImpl implements RejectedExecutionHandler {

	@Override
	public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
		System.out.println(r.toString() + "is rejected.");
	}

}
